import request from "../request.js"

function productDetail(id){
	return request({
		url:`/lejuClient/product/productDetail/${id}`
	})
}
//购买
function addPreOrder(data){
	return request({
		url:`/lejuClient/order/addPreOrder`,
		method:"post",
		data
	})
}


// 添加购物车
function addCart(data){
	return request({
		url:`/lejuClient/cart/addCart`,
		method:"post",
		data
	})
}

function getPreOrderById(orderId){
	return request({
		url:`/lejuClient/order/getPreOrderById/${orderId}`,
	
	})
}
function addConfirmOrder(data){
	return request({
		url:`/lejuClient/order/addConfirmOrder`,
		method:"post",
		data
	})
}


function payConfirm(data){
	return request({
		url:`/lejuClient/order/payConfirm`,
		method:"post",
		data
	})
}



export {
	productDetail,
	addPreOrder,
	addCart,
	getPreOrderById,
	payConfirm,
	addConfirmOrder
}